vaccinationcentervaccineday
Table Name: vaccinationcentervaccineday
Columns
| Column Name | Data Type | Description |
|---|---|---|
| dayNumber | smallint(6) | Represents the day number for the vaccine schedule (e.g., Day 1, Day 2, etc.). |
| vaccinationCenterId | int(11) | The unique identifier of the vaccination center. |
| vaccineId | smallint(6) | The unique identifier of the vaccine scheduled for administration. |
Indexes
- Primary Key Index:
Composite index on columns: (dayNumber, vaccinationCenterId, vaccineId)- Ensures that each record is uniquely identified by the combination of day, vaccination center, and vaccine.
- Index on vaccinationCenterId:
- Facilitates fast lookups of vaccine schedules based on the vaccination center.
- Index on vaccineId:
- Speeds up retrieval of vaccine schedules based on the vaccine.
Foreign Key Relationships
- vaccinationCenterId
- References the mappedId column in the vaccinationcenter table.
- This establishes a connection between the vaccine schedule and the specific vaccination center.
- vaccineId
- References the vaccineId column in the vaccine table.
- This connects the vaccine schedule to a specific vaccine.
Usage Notes
- This table is used to define the vaccination schedule for each vaccination center on a specific day.
- It helps to track which vaccine is administered on which day and at which center.
- The Primary Key ensures that each day’s vaccination schedule for a center and a vaccine is unique.
- By using foreign keys, the table ensures data integrity:
- A vaccinationCenterId must correspond to an existing vaccination center in the vaccinationcenter table.
- A vaccineId must correspond to an existing vaccine in the vaccine table.
- The indexes on vaccinationCenterId and vaccineId optimize query performance when filtering schedules by these fields, ensuring faster lookups when querying vaccination schedules for specific centers or vaccines.